package com.dreamlike.demo.HttpUtil.Core.Validator.impl;

import com.dreamlike.demo.HttpUtil.Core.HttpDefinition;
import com.dreamlike.demo.HttpUtil.Core.Validator.HttpDefinitionValidateResult;
import com.dreamlike.demo.HttpUtil.Core.Validator.HttpDefinitionValidator;

import java.util.Collection;
import java.util.Collections;

public class EncodedInstanceValidator implements HttpDefinitionValidator {
    @Override
    public boolean validate(HttpDefinition httpDefinition, HttpDefinitionValidateResult h) {
        return !Collection.class.isAssignableFrom(httpDefinition.getMethod().getReturnType());
    }
}
